package com.zbw;

import org.junit.Test;

import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ThreadAddArry {
    @Test
    public  void main() throws InterruptedException, ConcurrentModificationException {
        ArrayList<Integer> arr=new ArrayList<>();
        Map<String,String> map=new ConcurrentHashMap<>();
        new Thread(()->{
            System.out.println(Runtime.getRuntime().availableProcessors());
        }).start();
        Thread.sleep(100);
    };
}